﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PhotoGalleryEnteties.PhotoInfo>" %>

<h2>AddPhoto</h2>

    <% using (Html.BeginForm( "AddPhoto","Photo",FormMethod.Post ,new{enctype="multipart/form-data"}) ) {%>
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Add photo</legend>
   
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Title) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Title) %>
                <%: Html.ValidationMessageFor(model => model.Title) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Description) %>
            </div>
            <div class="editor-field">
                <%: Html.TextAreaFor(model => model.Description) %>
                <%: Html.ValidationMessageFor(model => model.Description) %>
            </div>
             <div class="editor-label">
               <label >Select file: </label>
            </div>
            <div class="editor-field">
                
                <input type="file" name="image" />
            </div> 
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>